<template>
  <div id="app">
    <!--<keep-alive>
          <router-view v-if="$route.meta.keepAlive"></router-view>
      </keep-alive>
      <router-view v-if="!$route.meta.keepAlive"></router-view>-->
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted() {
    /*   window.onresize = () => {
        return (() => {
          let a=document.body.clientWidth
          let b
          console.log(document.body.clientWidth,'-------a')
          // console.log(window.screen.width)
            // return
            if(a>1400&&a<1900){
                b= 1-(1900-a)*3/1250
                // document.getElementsByTagName('html')[0].style.zoom=b
            }
          if(a>=1900){
            document.getElementsByTagName('html')[0].style.zoom='1'
          }
          if(a<=1400){
            document.getElementsByTagName('html')[0].style.zoom='0.7'
          }
        })()
      }*/

  },
  created() {
    // this.resize()
  },
  methods: {
    resize() {
      // const a = window.screen.width
      // if (a < 1400) {
      //   document.getElementsByTagName('html')[0].style.zoom = '0.95'
      // }
      // if (a >= 1400 && a < 1600) {
      //   document.getElementsByTagName('html')[0].style.zoom = '0.96'
      // }
      // if (a >= 1600 && a < 1800) {
      //   document.getElementsByTagName('html')[0].style.zoom = '0.98'
      // }
      // if (a > 1900) {
      //   document.getElementsByTagName('html')[0].style.zoom = '1'
      // }
    }
  }
}

/*eslint no-extend-native: ["error", { "exceptions": ["String"] }]*/
String.prototype.trim = function() {
  return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '')
}

String.prototype.replaceAll = function(s1, s2) {
  return this.replace(new RegExp(s1, 'gm'), s2)
}

</script>
<style>

  html, body, #app {
    height: 100%;
    min-width: 980px;
    font-size: 14px;
  }

  .el-message-box__wrapper .el-message-box__content {
    max-height: 320px;
    overflow-y: auto;
  }

  .fl {
    float: left
  }

  .fr {
    float: right
  }

  .inline {
    display: inline-block;
  }

  .is-link {
    text-decoration: underline;
    color: #409EFF;
    cursor: pointer;
    display: inline;
  }

  .thedetail > .el-dialog {
    background: rgb(240, 242, 245);
  }

  .logolack {
    display: inline-block;
    height: 20px;
    line-height: 20px;
    width: 30px;
    background-color: red;
    color: white;
    border-radius: 8px;
  }
  /* 文字超过宽度度自动截断 */

  .text-truncate {
      word-wrap: normal;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
  }

  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  /* //滚动条的滑块 */
  ::-webkit-scrollbar-thumb {
    background-color: #a1a3a9;
    border-radius: 13px;
  }

/* 解决element-ui的table表格控件表头与内容列不对齐问题 */
  .el-table th.gutter{
    /*display: table-cell!important;*/
    display: block !important;
    overflow:hidden;

  }
  .el-table col:last-child{
    overflow:hidden;
  }

  .app-container {
    padding: 5px 20px 20px 20px;
  }

  .el-collapse-item__content {
    padding-bottom: 1px
  }

  .el-form-item--small.el-form-item {
    margin-bottom: 14px
  }

  .searchform .el-form-item--mini.el-form-item {
    margin-bottom: 5px
  }

  .el-collapse-item__header {
    height: 30px;
    line-height: 30px;
  }

  .app-container .el-button+.el-button{
    margin-left: 2px;
  }
  /* 解决悬浮太长的问题 */
  .el-tooltip__popper{
    max-width: 95vw;
  }
</style>
